package com.chinasofti;

import java.util.Scanner;

public class Demo02 {
    public static void print(int n,int m) {
        System.out.println("打印"+n+"到"+ m +"之间的奇数");
        if (n<m){
            for(int i=n;i<m;i++){
                if(i%2!=0){
                    System.out.println(i);
                }
            }
        }else {
            for(int i=m;i<n;i++){
                if(i%2!=0){
                    System.out.println(i);
                }
            }
        }

    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入两个数");
        int n = sc.nextInt();
        int m = sc.nextInt();
        print(n,m);
    }
}
